<?php
/**
 * Author: Administrator
 * Date: 2022/7/15 2:39
 */

namespace DesignPatterns\Creation\FactoryMethod;

abstract class FactoryMethod
{
    const SLOW = 1;
    const FAST = 2;

    abstract protected function createVehicle($type);


    public function create($type) {
        $vehicle = $this->createVehicle($type);
        $vehicle->setColor('#F00');
        return $vehicle;
    }

}